package cn.itrip.auth.service.token;

import cn.itrip.beans.pojo.ItripUser;
import cn.itrip.beans.vo.ItripTokenVO;

/**
 * TokenService class
 *
 * @author Administrator
 * @date 2021/7/2
 */
public interface TokenService {
    String TOKEN_PREFIX = "token:";

    String FLAG_PC = "PC";

    String FLAG_MOBILE = "MOBILE";

    String TOKEN_DELIMITER = "-";

    int SESSION_TIMEOUT = 2 * 60 * 60;

    ItripTokenVO generateToken(ItripUser user, String userAgent);

    boolean save(String token, ItripUser user);

}
